<!DOCTYPE html>
<html>
<head>
    <title>提示组件</title>

    <meta name="keywords" content="keyword1,keyword2,keyword3">
    <meta name="description" content="this is my page">
    <meta name="content-type" content="text/html; charset=UTF-8">

    #required_css
</head>

<body>
<div class="app">
    <div class="row">
        <div class="col-lg-12">
            <h3>基本弹窗提示</h3>
            <button class="btn btn-default" type="button" onclick="ns.alert('This is alert!', function(){alert('ok!')})">alert</button>
            <button class="btn btn-default" type="button" onclick="ns.alert('你知道吗？亲！<br>layer ≠ layui<br><br>layer只是作为Layui的一个弹层模块，由于其用户基数较大，所以常常会有人以为layui是layerui<br><br>layer虽然已被 Layui 收编为内置的弹层模块，但仍然会作为一个独立组件全力维护、升级。<br><br>我们此后的征途是星辰大海 ^_^', function(){alert('ok!')}, {theme:'modal-board'})">alert-board</button>
            <button class="btn btn-default" type="button" onclick="ns.confirm('Are you OK?', function(){ns.alert('you choose ok!')}, function(){ns.alert('you choose cancel!')})">confirm</button>
            <button class="btn btn-default" type="button" onclick="ns.prompt('输入登录口令，并确认',function(v){ns.alert('Hello '+v)}, function(){ns.alert('you choose cancel!')})">prompt</button>
            <button class="btn btn-default" type="button" onclick="ns.prompt('Your password:',function(v){ns.alert('Hello '+v)}, function(){ns.alert('you choose cancel!')},{password:true})">prompt-pwd
            </button>
            <button class="btn btn-default" type="button" onclick="ns.prompt('Your Answer:',function(v){ns.alert('Hello '+v)}, function(){ns.alert('you choose cancel!')}, {textarea:true})">
                prompt-textarea
            </button>
            <button class="btn btn-default" type="button" onclick="showImage()">Image</button>
            <button class="btn btn-default" type="button" onclick="ns.success('保存成功！')">Success</button>
            <button class="btn btn-default" type="button" onclick="ns.error('保存失败！')">Error</button>
            <h3>消息提示</h3>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.alert('This is alert!')">alert</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.success('This is success!')">success</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.info('This is info!')">info</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.warning('This is warning!')">warning</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.error('This is error!')">error</button>
            <h3>消息提示(居中)</h3>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.alertCenter('这是一个居中的提示信息！！！！！')">alert</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.successCenter('这是一个成功提示!!!')">success</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.infoCenter('这是一个消息提示!!!')">info</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.warningCenter('这是一个警告信息!!!')">warning</button>
            <button class="btn btn-default" type="button" onclick="ns.tip.toast.errorCenter('这是一个错误信息!!!')">error</button>
            <h3>进度提示</h3>
            <button class="btn btn-default" type="button" onclick="ns.showProgressbar('正在加载...');">showProcessBar</button>
            <button class="btn btn-default" type="button" onclick="ns.showLoading()">showLoading</button>
            <button class="btn btn-default" type="button" onclick="ns.showLoadingbar()">showLoadingBar</button>
        </div>
    </div>
</div>
#required_js
<script type="text/javascript">
    ns.ready(function () {
        ns.requireJS("$!basePath/framework/js/view/toast.js");
    });
    var images = [
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg',
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg',
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg',
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg',
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg',
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg',
        'http://file01.16sucai.com/d/file/2013-11-02/13833828748358.jpg'
    ];
    function showImage() {
        ns.view.showImage(images);
    }
</script>
</body>
</html>
